/*
 * @Author: cola(sunshiwen)
 * @Date: 2022-05-07 15:40:26
 * @LastEditTime: 2022-05-07 20:06:38
 * @LastEditors: cola(sunshiwen)
 * @Description: 
 * @FilePath: /maycur-koa/schema/deploy_manage_schema.js
 */
'use strict';

const Joi = require('@hapi/joi');

const addNewDeployProductSchema = {
    body: Joi.object({
        name: Joi.string().required(),
        code: Joi.string().required(),
    }),
}
const fetchDeployEnvListSchema = {
    router: Joi.object({
        category: Joi.string().required(),
    }),
}
const addNewDeployEnvSchema = {
    body: Joi.object({
        category: Joi.string().required(),
        deployName: Joi.string().required(),
        deployLink: Joi.string().required(),
        env: Joi.string().required(),
    })
}
const updateDeployEnvSchema = {
    body: Joi.object({
        category: Joi.string().required(),
        deployName: Joi.string().required(),
        deployLink: Joi.string().required(),
        env: Joi.string().required(),
        id: Joi.number().required(),
    })
}
module.exports = {
    addNewDeployProduct: addNewDeployProductSchema,
    fetchDeployEnvList: fetchDeployEnvListSchema,
    addNewDeployEnv: addNewDeployEnvSchema,
    updateDeployEnv: updateDeployEnvSchema,
}